package com.example.controller;

import com.example.dal.entity.DemoAuthor;
import com.example.service.DemoAuthorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import java.time.LocalDateTime;

/**
 * @Author: flen
 * @Date: 2018/12/18 13:54
 */
@RestController
@RequestMapping("/demo")
public class DemoController {

	@Autowired
	DemoAuthorService demoAuthorService;

	@PostMapping("/author")
	public void addAuthor(@RequestParam String name){

		demoAuthorService.addAuthor(name);

	}
}
